//
//  Equatable+extension.swift
//  ERecycle-Shop
//
//  Created by abb on 16/9/8.
//  Copyright © 2016年 abb. All rights reserved.
//

import Foundation
extension Equatable {
    func isIn<T:SequenceType where T.Generator.Element == Self>(collection: T) -> Bool {
        return collection.contains(self)
    }
    
    func isIn(collection: Self...) -> Bool {
        return collection.contains(self)
    }
}